﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wpftest.AttributeStudy;
using Wpftest.ControlFile;
using Wpftest.FormFile;
using Wpftest.PATHEVENT;

namespace Wpftest
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void text_textchanged(object sender, TextChangedEventArgs e)
        {

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show("update data Success!!!");
            BuJuForm bujuform = new BuJuForm();
            bujuform.Show();
        }
        int count = 0;
        private void RepeatButton_Click(object sender, RoutedEventArgs e)
        {
            count++;
            var repeatbutton = (RepeatButton)sender;
            repeatbutton.Content = string.Format("事件执行次数：{0}",count);
        }

        private void ToggleButton_Click(object sender, RoutedEventArgs e)
        {
            var togglebutton=(ToggleButton)sender;
            var flag=togglebutton.IsChecked;
            if (flag.HasValue)
            {
                if (flag.Value)
                {
                    MessageBox.Show("ture!");
                }
                else
                {
                    MessageBox.Show("false");
                }
            }
            else
            {
                MessageBox.Show("null!");
            }
        }

        private void Expander_Expanded(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show("Expanded");
        }

        private void Expander_Collapsed(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show("Collapsed");
        }

        private void ButtonMenu_Click(object sender, RoutedEventArgs e)
        {
            menuform menu = new menuform();
            menu.Show();
        }
        private void ButtonCommand_Click(object sender, RoutedEventArgs e)
        {
            CommandPage CommandPage = new CommandPage();
            CommandPage.Show();
        }
        private void DataBinding_Click(object sender, RoutedEventArgs e)
        {
            DataBindingForm DataBindingPage = new DataBindingForm();
            DataBindingPage.Show();
        }
        private void TREETEST_Click(object sender, RoutedEventArgs e)
        {
            TREETEST TREETEST = new TREETEST();
            TREETEST.Show();
        }
        private void RoutedEvent_Click(object sender, RoutedEventArgs e)
        {
            RoutedEventTest rouev=new RoutedEventTest();
            rouev.Show();
        }
        private void AttachEventPage_Click(object sender, RoutedEventArgs e)
        {
            AttachEventPage attevp = new AttachEventPage();
            attevp.Show();
        }
        private void AttributeStudy_Click(object sender, RoutedEventArgs e)
        {
            AttributeStudyForm attr = new AttributeStudyForm();
            attr.Show();
        }
    }
}
